package com.md.youyouhui.net.repo;

import android.arch.lifecycle.LiveData;

import com.md.youyouhui.common.Resource;
import com.md.youyouhui.net.ApiServiceFac;
import com.md.youyouhui.net.response.GetShoppingDetailsResponse;
import com.md.youyouhui.utils.calladapter.ResourceConvertUtils;

/**
 * Created by AdministratorZJ
 * on 2018/5/25.
 */

public class GetShoppingDetailsRepo {
    private static GetShoppingDetailsRepo INSTANCE;

    public static GetShoppingDetailsRepo newInstance() {
        if (null == INSTANCE) {
            INSTANCE = new GetShoppingDetailsRepo();
        }
        return INSTANCE;
    }


    public LiveData<Resource<GetShoppingDetailsResponse>> getShoppingDetails(String categoryId) {

        return ResourceConvertUtils.convertResource(ApiServiceFac.get().getShoppingDetails(categoryId));
    }


}
